package com.dmooo.yxmmerchant.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.common.glide.GlideUtils;
import com.dmooo.yxmmerchant.R;
import com.dmooo.yxmmerchant.common.Config;
import com.dmooo.yxmmerchant.domain.MerchantAdminListBean;

import java.util.List;

public class MerchantAdminListAdapter extends BaseQuickAdapter<MerchantAdminListBean.Item,BaseViewHolder> {
    public MerchantAdminListAdapter(int layoutResId, @Nullable List<MerchantAdminListBean.Item> data) {
        super(layoutResId, data);
    }
    @Override
    protected void convert(BaseViewHolder helper, MerchantAdminListBean.Item item) {
        GlideUtils.showImageViewToCircle(mContext,mContext.getResources().getDrawable(R.mipmap.defaultpicture_pc),Config.APP_INTERFACE_BASE_URL+item.avatar,helper.getView(R.id.img_head));
        helper.setText(R.id.txt_name,item.truename);
    }
}
